1. Field of the Invention
The present invention relates to techniques for balancing the use of computational resources within a multi-computer system. More specifically, the present invention relates to a method and apparatus for estimating a dominant computational resource used by a computer program.
2. Related Art
Many organizations maintain large “server farms,” which are capable of executing thousands of programs simultaneously. For example, large web sites and interne portal sites, such as search engines and news sites, typically provide hundreds or thousands of servers to respond to user requests. During this process, a load balancer is typically used to schedule requests onto machines with available computational resources. In order to make good scheduling decisions, it is desirable for the load balancer to know what computational resources are required by specific programs so that the programs can be scheduled to run on machines on which these computational resources are available.
For example, consider four programs, P1, P2, P3, and P4, wherein P1 and P2 are CPU-bound and that P3 and P4 have large memory footprints but do not use significant amount of processor time. In this case, scheduling P1 and P3 to execute on the same server while running P2 and P4 together on a different server results in a more efficient utilization of computational resources and results in better quality of service (QOS) than collocating the two CPU-bound programs, P1 and P2, on one server, and collocating the other memory-intensive programs, P3 and P4, on another server.
On the other hand, if the load balancer receives an unknown program about which it has no information, the load balancer does not know which computational resources will be used by the program. Consequently, the load balancer cannot efficiently schedule the program on a server within the server farm.
Hence, what is needed is a method and an apparatus for estimating the dominant computational resource of a program to facilitate scheduling the program to run on a specific machine in a server farm.